package org.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.sql.Timestamp;

@Data
@Schema(description = "退款实体")
public class Refund {
    @TableId(type = IdType.AUTO)
    @Schema(description = "退款ID")
    private Long id;

    @Schema(description = "订单ID")
    private Long orderId;

    @Schema(description = "订单号")
    private String orderNo;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "退款金额")
    private BigDecimal refundAmount;

    @Schema(description = "退款原因")
    private String refundReason;

    @Schema(description = "退款单号")
    private String refundNo;

    @Schema(description = "退款状态:0申请中,1已同意,2已拒绝,3退款中,4已退款,5退款失败")
    private Integer status;

    @Schema(description = "商家备注")
    private String merchantRemark;

    @Schema(description = "凭证图片(JSON格式)")
    private String evidenceImages;

    @Schema(description = "申请时间")
    private Timestamp applyTime;

    @Schema(description = "处理时间")
    private Timestamp processTime;

    @Schema(description = "退款成功时间")
    private Timestamp successTime;

    @Schema(description = "创建时间")
    private Timestamp createdAt;

    @Schema(description = "更新时间")
    private Timestamp updatedAt;

    @TableField(exist = false)
    @Schema(description = "订单信息")
    private Order order;

    @TableField(exist = false)
    @Schema(description = "用户信息")
    private User user;
} 